all: libapr ab apr-skeleton

libapr:
	make -C ./apr/ all
	

apr-skeleton: apr-skeleton.c 
	gcc apr-skeleton.c -o apr-skeleton -I./apr/aprutil-build/include/apr-1/ -I./apr/apr-build/include/apr-1/ -I./tongsuo/include -L./apr/apr-build/lib/  -lapr-1 -Wl,-Bdynamic -lpthread -lc -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE

ab: ab.c ap_release.h
	gcc ab.c ap_release.h -o ab -I./apr/aprutil-build/include/apr-1/ -I./apr/apr-build/include/apr-1/ -I./tongsuo/include -L./apr/apr-build/lib/ -L./apr/aprutil-build/lib/ -L./tongsuo/lib64 -lcrypto -lssl -lapr-1 -laprutil-1 -Wl,-rpath=./tongsuo/lib64 -Wl,-rpath=apr/apr-build/lib  -Wl,-rpath=apr/aprutil-build/lib -Wl,-Bdynamic -lm -lc -lpthread -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE

clean:
	make -C ./apr/ clean
	rm ab apr-skeleton
